package com.example.pre.service.impl;

import java.util.Collection;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.pre.dao.AskOffDao;
import com.example.pre.model.AskOff;
import com.example.pre.service.AskOffService;

/*
 * 请假申请service层实现类
 */
@Service
public class AskOffServiceImpl implements AskOffService {

	@Autowired
	private AskOffDao askOffDao;

	@Override
	public AskOff get(int id) {
		return askOffDao.get(id);
	}

	@Override
	public Collection<AskOff> getAll() {
		return askOffDao.listByCondition(null);
	}

	@Override
	public boolean update(AskOff m) {
		return askOffDao.update(m) == 1;
	}

	@Override
	public boolean delete(int id) {
		return askOffDao.delete(id) == 1;
	}

	@Override
	public boolean create(AskOff m) {
		return askOffDao.create(m) == 1;
	}

	@Override
	public Collection<AskOff> listByCondition(Map<String, Object> whereColumn) {
		return askOffDao.listByCondition(whereColumn);
	}

	@Override
	public int countByCondition(Map<String, Object> whereColumn) {
		return askOffDao.countByCondition(whereColumn);
	}

}
